package com.woniuxy.entity;

/**
 * @author LinKe
 * @version 1.0
 * @date 2021/11/9 14:36
 *
 *  接口回调测试 降低耦合度

 */
public interface Person {
    void eat();

}
class Chinese implements Person {

    public void eat() {
        System.out.println("中国人吃中餐");

    }
}

class American implements Person {

    public void eat() {
        System.out.println("外国人吃西餐");

    }
}
class Test{
    public static void main(String[] args) {
        Person p = new Chinese();
        p.eat();
    }
}
